package com.jisf.driver.controller;

import com.jisf.driver.entity.vo.SetCoachRequestVo;
import com.jisf.driver.response.Result;
import com.jisf.driver.response.ResultCode;
import com.jisf.driver.service.ICoachExamineService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import org.springframework.stereotype.Controller;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author jisf
 * @since 2022-05-10
 */
@RestController
@RequestMapping("/driver/coachExamine")
public class CoachExamineController {

    @Autowired
    private ICoachExamineService iCoachExamineService;

    @PostMapping("setCoach")
    @PreAuthorize("hasAnyAuthority('coachExamine:setCoach')")
    public Result<?> setCoach(@RequestBody SetCoachRequestVo setCoachRequestVo){
        ResultCode resultCode = iCoachExamineService.setCoach(setCoachRequestVo);
        return Result.ok(resultCode);
    }

}
